Skip to content

Instantly share code, notes, and snippets.

@akatrevorjay
akatrevorjay / git-fshow
Last active May 19, 2024 01:39 — forked from junegunn/gist:f4fca918e937e6bf5bad
Browsing git commit history with fzf
#!/bin/zsh
# git-fshow - git commit browser
#
# https://gist.github.com/akatrevorjay/9fc061e8371529c4007689a696d33c62
# https://asciinema.org/a/101366
#
git-fshow() {
local g=(
git log
@luncliff
luncliff / logger.cpp
Last active May 19, 2024 01:38
C++, Swift build with CMake
#include "logger.hpp"
#include "logger_binding.h"
#define FMT_HEADER_ONLY
#define SPDLOG_HEADER_ONLY
#include <fmt/format.h>
#include <fmt/xchar.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/sinks/stdout_sinks.h>
#include <spdlog/spdlog.h>
@akatrevorjay
akatrevorjay / loc
Last active May 19, 2024 01:31
loc: mlocate + fzf integration
#!/usr/bin/env zsh
#
# loc: mlocate + fzf integration
#
# https://gist.github.com/06dc1238b2fcbfb6c10bbad05ad79bc1
# https://asciinema.org/a/102006
#
# ~ trevorj <github@trevor.joynson.io>
#
setopt pipe_fail err_return err_exit
@mikeyh
mikeyh / SMJobBlessUtil-python3.py
Last active May 19, 2024 01:27
SMJobBlessUtil.py for Python3 / Xcode 13.3 / macOS Monterey 12.3 (with workaround for otool arm64 weirdness)
#! /usr/bin/python3
#
# File: SMJobBlessUtil.py
#
# Contains: Tool for checking and correcting apps that use SMJobBless.
#
# Written by: DTS
#
# Copyright: Copyright (c) 2012 Apple Inc. All Rights Reserved.
#
@Ravarcheon
Ravarcheon / spectralRotation.py
Created May 18, 2024 13:23
rotates an audio file by 90 degrees in the spectrum while being a reversible process with minimal loss (only floating point errors which are like -150 dB but thats literally silence ahaha~)
import numpy as np
import soundfile as sf
from scipy.fftpack import fft, ifft
def rotateSignal(signal,flip):
if flip:
signal = signal[::-1]
x = np.concatenate((signal, signal[1:][::-1])) # concatenating the array with a reverse of itself makes it such that the fourier transform doesn't layer over a reversed version of itself in the inverse fft
rotSig = np.real(ifft(x))
@CumTrust
CumTrust / Cash.App
Created May 18, 2024 01:57
Spectrum.net
facebook-domain-verification=rz86gtthhiwz8v7qqp2ni4xfx21sas
@jhaddix
jhaddix / cloud_metadata.txt
Last active May 19, 2024 01:19 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@aaossa
aaossa / README.md
Created October 1, 2017 19:28
Cómo trabajar con git branches

Workflow con git

Para este proyecto seguiremos la metodología de tener una branch principal master (equivalente a release en otros proyectos), una branch dev (o development) para comprobar que todo funcione antes de enviar los cambios a master y múltiples "feature branches" para que cada colaborador pueda enacrgarse de una tarea definida, trabajarla y probarla a gusto antes de reunir los cambios en dev. Para más detalle y ejemplos pueden usar de esta lectura la sección Feature Branch Workflow.

From: https://www.atlassian.com/pt/git/workflows

Pasos para empezar a trabajar en una feature

@dy
dy / scoped-script.html
Created September 15, 2020 13:36
Scoped script polyfill
<!DOCTYPE html>
<script id='scoped-script'>
let i = 0;
(new MutationObserver(rx=>rx.forEach(({target:s}) => {
if (s.tagName !== 'SCRIPT' || s.scoped || !s.hasAttribute('scoped')) return
s.scoped=true
if (!s.id) s.id='__s'+i++
s.innerHTML=`(function(){${s.innerHTML}}).call(document.getElementById('${s.id}').parentNode)`
}))).observe(document, {childList:true,subtree:true,attributes:true,attributeFilter:['scoped']})
@CHIZI-0618
CHIZI-0618 / PuerNya_sing-box_fakeip_client_config.jsonc
Last active May 19, 2024 01:12
sing-box 带有 Proxy Providers 的客户端配置示例
{
"log": {
"level": "info",
"output": "sing-box.log",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "cloudflare",